package com.job51.hro.datacheckservice.feign;

import com.job51.hro.datacheckservice.dto.fegin.wechatrobot.FileUploadResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@Component
@FeignClient(name = "wechat-robot-file-uploader", url = "${wechatrobot.file-uploader}")
public interface WechatRobotFileUploader {
    @PostMapping(value = "", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    FileUploadResult uploadFile(@RequestPart(value = "media") MultipartFile file);
}
